using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;

namespace RandomRat
{
	/// <summary>
	/// Summary description for EditRule.
	/// </summary>
	public class EditRule : System.Windows.Forms.Form {
		


		private System.Windows.Forms.Label label1;
		private System.Windows.Forms.Label label2;
		private System.Windows.Forms.Button butCancel;
		private System.Windows.Forms.Button butOK;
		private NumberBox numGrouping;
		private NumberBox numTolerance;
		private System.ComponentModel.Container components = null;

		public EditRule(string grouping, string tolerance) {
			InitializeComponent();
			
			numGrouping.Text = grouping;
			numTolerance.Text = tolerance;
		}

		public string Grouping {
			get { return numGrouping.Text; }
		}

		public string Tolerance {
			get { return numTolerance.Text; }
		}

		private void butOK_Click(object sender, System.EventArgs e) {
			this.DialogResult = DialogResult.OK;
			this.Close();
		}


		protected override void Dispose( bool disposing )
		{
			if( disposing )
			{
				if(components != null)
				{
					components.Dispose();
				}
			}
			base.Dispose( disposing );
		}

		#region Windows Form Designer generated code
		/// <summary>
		/// Required method for Designer support - do not modify
		/// the contents of this method with the code editor.
		/// </summary>
		private void InitializeComponent()
		{
			this.numGrouping = new NumberBox();
			this.numTolerance = new NumberBox();
			this.label1 = new System.Windows.Forms.Label();
			this.label2 = new System.Windows.Forms.Label();
			this.butCancel = new System.Windows.Forms.Button();
			this.butOK = new System.Windows.Forms.Button();
			this.SuspendLayout();
			// 
			// numGrouping
			// 
			this.numGrouping.Location = new System.Drawing.Point(8, 26);
			this.numGrouping.MaxLength = 9;
			this.numGrouping.Name = "numGrouping";
			this.numGrouping.Size = new System.Drawing.Size(76, 20);
			this.numGrouping.TabIndex = 0;
			this.numGrouping.Text = "";
			// 
			// numTolerance
			// 
			this.numTolerance.Location = new System.Drawing.Point(88, 26);
			this.numTolerance.MaxLength = 9;
			this.numTolerance.Name = "numTolerance";
			this.numTolerance.Size = new System.Drawing.Size(76, 20);
			this.numTolerance.TabIndex = 1;
			this.numTolerance.Text = "";
			// 
			// label1
			// 
			this.label1.Location = new System.Drawing.Point(8, 8);
			this.label1.Name = "label1";
			this.label1.Size = new System.Drawing.Size(56, 16);
			this.label1.TabIndex = 4;
			this.label1.Text = "Grouping:";
			// 
			// label2
			// 
			this.label2.Location = new System.Drawing.Point(88, 8);
			this.label2.Name = "label2";
			this.label2.Size = new System.Drawing.Size(60, 16);
			this.label2.TabIndex = 5;
			this.label2.Text = "Tolerance:";
			// 
			// butCancel
			// 
			this.butCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
			this.butCancel.Location = new System.Drawing.Point(232, 26);
			this.butCancel.Name = "butCancel";
			this.butCancel.Size = new System.Drawing.Size(56, 20);
			this.butCancel.TabIndex = 3;
			this.butCancel.Text = "Cancel";
			// 
			// butOK
			// 
			this.butOK.Location = new System.Drawing.Point(171, 26);
			this.butOK.Name = "butOK";
			this.butOK.Size = new System.Drawing.Size(56, 20);
			this.butOK.TabIndex = 2;
			this.butOK.Text = "OK";
			this.butOK.Click += new System.EventHandler(this.butOK_Click);
			// 
			// EditRule
			// 
			this.AcceptButton = this.butOK;
			this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
			this.CancelButton = this.butCancel;
			this.ClientSize = new System.Drawing.Size(296, 54);
			this.ControlBox = false;
			this.Controls.AddRange(new System.Windows.Forms.Control[] {
																		  this.butCancel,
																		  this.butOK,
																		  this.label2,
																		  this.label1,
																		  this.numTolerance,
																		  this.numGrouping});
			this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
			this.MaximizeBox = false;
			this.Name = "EditRule";
			this.ShowInTaskbar = false;
			this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
			this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
			this.Text = "Edit Pattern";
			this.Activated += new System.EventHandler(this.EditRule_Activated);
			this.ResumeLayout(false);

		}
		#endregion



		private void EditRule_Activated(object sender, System.EventArgs e) {
			numGrouping.Focus();
		}






	}
}
